#include <bits/stdc++.h>
using namespace std;
//天干:  1979 -- 2020 = -41  说明前移41《==》前移 41//10 = 4  41-4*10 = 1 前移1个 <=> 后移 10-1 == 9个
//地支：1979 -- 2020 == --41   前移41  《==》 前移41//12 == 3 41-3*12 == 5  前移5个《==》后移12-5 == 7个 
//天干   2049-2020==29 后移29  29//10 == 2  29-2*10 == 9 后移9 
//地支：2049-2020==29 后移29   29//12  ==2  29-2*12 =  5 后移5
string TianGan[10] = {"jia","yi","bing","ding","wu","ji","geng","xin","ren","gui"};
string DiZhi[12] = {"zi","chou","yin","mao","chen","si","wu","wei","shen","you","xu","hai"};
int main()
{
  int baseLine = 2020;
  int ti = 6,di = 0;
  int tar;cin>>tar;
  int minus = tar - baseLine;
  if (minus<0){
    //前移
    minus = -minus;
    int mti = minus - (minus / 10)*10;
    mti = 10 - mti; //后移量
    ti = (ti + mti) % 10;

    int mdi = minus - (minus / 12)*12;
    mdi = 12 - mdi;
    di = (di + mdi)%12;
    cout<<TianGan[ti]+DiZhi[di];
  }else{
    int mti = minus - (minus / 10)*10;
    ti = (ti + mti) % 10;

    int mdi = minus - (minus / 12)*12;
    di = (di + mdi)%12;
    cout<<TianGan[ti]+DiZhi[di];
  }

  return 0;
}